package com.platform.modules.quality.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.platform.common.utils.RestResponse;
import com.platform.modules.quality.dto.QlyInspectionItemListByAppDto;
import com.platform.modules.quality.service.QlyInspectionItemService;
import com.platform.modules.quality.vo.CommonResult;
import com.platform.modules.quality.vo.QlyInspectionItemListByAppVo;
import com.platform.modules.sys.controller.AbstractController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;

/**
 * Controller
 *
 * @author biaohuming
 * @date 2020-02-19 16:17:28
 */
@Api(tags = "QlyInspectionItemController|质量巡查问题列表")
@RestController
@RequestMapping("qly/inspectionItem")
public class QlyInspectionItemController extends AbstractController {

    @Autowired
    private QlyInspectionItemService qlyInspectionItemService;
    
    /**
     * @descr 查询 质量巡查记录的 问题列表(包含整改信息和复查信息) 移动端<br>
     * @param currPage
     * @param limit
     * @return
     */
    @ApiOperation(value = "查询 质量巡查记录的 问题列表(包含整改信息和复查信息) 移动端")
    @ApiImplicitParams({
		@ApiImplicitParam(paramType = "query", name = "insId", value = "巡查记录ID", dataType = "String")
    })
    @PostMapping("/inspectionItemListByApp")
    public CommonResult<List<QlyInspectionItemListByAppVo>> inspectionItemListByApp(@RequestBody QlyInspectionItemListByAppDto inspection) {
        List<QlyInspectionItemListByAppVo> list = qlyInspectionItemService.queryInspectionItemAndReformListByApp(inspection.getInsId());
        return CommonResult.success(list);
    } 
    
    
}
